import { defineConfig } from 'umi';

export default defineConfig({
  // outputPath: '../dist/app',
  // base: '/',
  // publicPath: '/',
  nodeModulesTransform: {
    type: 'none',
  },
  routes: [
    { path: '/index', component: '@/pages/index' },
    { path: '/jest', component: '@/pages/tests/test' },
    {
      path: '/app',
      name: '应用',
      //注册子路由
      routes: [
        {
          path: 'blog',
          microApp: 'blog',
        },
      ],
    },
  ],
  //注册qiankun应用
  qiankun: {
    master: {
      // 注册子应用信息
      apps: [
        {
          name: 'blog',
          entry: 'http://localhost:8001',
        },
      ],
      //   jsSandbox: true, // 是否启用 js 沙箱，默认为 false
      //   prefetch: true, // 是否启用 prefetch 特性，默认为 true
    },
  }
});
